<template>
  <div>
    <el-container>
      <el-main>
        <div class="contentShadow">
          <h1>学生专利成果</h1>
          <el-radio-group v-model="size">
            <el-radio label="">默认</el-radio>
            <el-radio label="medium">中等</el-radio>
            <el-radio label="small">小型</el-radio>
            <el-radio label="mini">超小</el-radio>
          </el-radio-group>
          <el-descriptions class="des" direction="vertical" :column="4" :size="size" border>
            <el-descriptions-item :span="3">
              <template slot="label">
                <i class="el-icon-s-promotion"></i>
                名称
              </template>
              {{ patent.patentName }}
            </el-descriptions-item>
            <el-descriptions-item :span="1">
              <template slot="label">
                <i class="el-icon-paperclip"></i>
                类型
              </template>
              <el-tag type="warning" :size="size">
                <template v-if="patent.type === 1">发明</template>
                <template v-else-if="patent.type === 2">实用新型</template>
                <template v-else-if="patent.type === 3">外观设计</template>
                <template v-else-if="patent.type === 4">发明授权</template>
                <template v-else-if="patent.type === 5">其它</template>
              </el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-user-solid"></i>
                姓名
              </template>
              <el-tag type="success" :size="size">{{ patent.name }}</el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-user"></i>
                学号
              </template>
              <el-tag type="main" :size="size">{{ patent.studentId }}</el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-date"></i>
                申请日期
              </template>
              {{ patent.applicationDate }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-date"></i>
                公开日期
              </template>
              {{ patent.publicationDate }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-date"></i>
                申请号
              </template>
              {{ patent.applicationNumber }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-date"></i>
                公开号
              </template>
              {{ patent.publicationNumber }}
            </el-descriptions-item>
            <el-descriptions-item :span="4">
              <template slot="label">
                <i class="el-icon-document"></i>
                介绍
              </template>
              {{ patent.patentIntroduction }}
            </el-descriptions-item>
          </el-descriptions>
        </div>
      </el-main>
    </el-container>
  </div>
</template>


<style scoped>
.assess-page {
  height: 100%;
  /* left:50%; */
}

.content {
  margin-left: 20%;
  margin-top: 1%;
  padding-left: 5%;
  padding-right: 5%;
  padding-top: 3%;
  padding-bottom: 5%;
  /* font-size: 26; */
  width: 50%;
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.des {
  font-size: larger;
}
</style>
<script>
import {findPatentDetail} from "@/api/admin";

export default {
  data() {
    return {
      size: '',
      patent: {
        patentId: 0,
        patentName: "这里是专利名称",
        patentIntroduction: "这里是专利介绍",
        type: 1,
        applicationDate: '申请日期',
        publicationDate: '公开日期',
        applicationNumber: '申请号',
        publicationNumber: '公开号',
        studentId: "2200012345",
        name: "张三",
      },
    }
  },
  mounted() {
    this.patent.patentId = Number(window.location.search.substring(4));
    findPatentDetail(this.patent.patentId).then(res => {
      this.patent = res.data
    })
  },
  methods: {}
}
</script>
